package com.example.demo.mapper;

import com.example.demo.entity.Articleinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-04-02
 * Time:10:51
 */
@Mapper
public interface ArticleMapper {
    int getArtCountByUid(@Param("uid") Integer uid);

    List<Articleinfo> getMyList(@Param("uid") Integer uid);

    int del(@Param("uid")Integer uid,@Param("id") Integer id);

    Articleinfo getDetail(@Param("id")Integer id);
    //阅读量更新
    int upRCount(@Param("id") Integer id);
    //查询
    int getArtRCount(@Param("id") Integer id);
    //添加文章
    int add(Articleinfo articleinfo);

    //修改文章
    int edit(Articleinfo articleinfo);
    //文章总数
    int artCount();
    //分页查询
    List<Articleinfo> listPage(@Param("size") Integer size,@Param("index") Integer index);
}
